import request from '@/utils/request';

// 查询数据中心区域Id集
export function getAreaIdList(query: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/area/list',
		method: 'get',
		params: query,
	});
}

// 查询区域列表
export function getAreaList(query?: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/area/getAreaList',
		method: 'get',
		params: query,
	});
}

// 查询数据中心区域详情
export function getAreaDetail(id: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/area/' + id,
		method: 'get',
	});
}

// 新增数据中心区域-分配
export function addDataCenterArea(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/area',
		method: 'post',
		data: data,
	});
}

// 修改数据中心信息
export function updateDataCenterArea(data: anyObj): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/area',
		method: 'put',
		data: data,
	});
}

// 删除数据中心区域
export function delDataCenterArea(id: any): ApiPromise<ApiResponse> {
	return request({
		url: '/management/dataCenter/area/' + id,
		method: 'delete',
	});
}
